//	KadKuid.h : Kademlia GUID implementation.
//
#pragma once

#include <Windows.h>
#include <string>

namespace gKad {
	//	Kademlia Unique Identifier
	//
	struct s_KadUID {
		ULONG	data[4];
	};

	class KUID : s_KadUID
	{
	public:
		KUID();
		int CompareTo(const KUID &uOther) const;
		int CompareTo(ULONG val) const;
		KUID& SetValueRandomGUID();
		bool operator<  (const KUID &val) const;
		bool operator>  (const KUID &val) const;
		bool operator<= (const KUID &val) const;
		bool operator>= (const KUID &val) const;
		bool operator== (const KUID &val) const;
		bool operator!= (const KUID &val) const;
		KUID operator^ (const KUID &val);
		// return T/F regarding to bit
		// return F on OOB
		bool operator[] (UINT bit);
		void operator= (const KUID &val) const;

	protected:

	private:
	};
}